Written by: Prograph International (Garth Smedley)
Contents: Document Shell.pgs
Document Shell.rsrc
Document Shell.ReadMe
Needs Prograph Extensions:
Math Primitives
More Primitives
Primitives
SegLoad
Alias
Apple Event
Needs Libraries to Compile:
Document Shell.rsrc
SCLibrary 2.6
Library 2.6
Standard Methods That Were Modified:
None
New Classes:
File
Printer
Apple Event
Document
Close Dialog
Doc App
Description
-----------
The Document Shell, as the name implies, is a generic application that handles documents. That is, it provides code for opening, saving, printing and closing generic documents, as well as handling required Apple Events. You have to flesh it out with your own code for loading saving, printing and editing your document's format.
How To Use In Your Program
-------------------------
The easiest way to use the document shell is to use it as a starting point for your application. Otherwise selectively load all the classes named above and all universal methods into your file.
The Document Shell implements a complete "File" Menu. It Opens, Saves, Closes, and Prints documents automatically and handles the required Apple Events. You have to override load and save data methods in class Document and a couple of methods in class Printer to save and print your document's data.
The "Document Shell.rsrc" file contains a bundle resource which tells the Finder which icons to use when displaying your documents and your application. The bundle resource and the "save type", "creator" and "load types" attributes of the "File" class should be changed to your own application signature and file type. The Finder will not draw your icons until you have built your application with the Prograph compiler.